function cbxOnChange(obj, recId){
    document.getElementById('btnSave').disabled = false;
    document.getElementById('btnSave2').disabled = false;
    document.getElementById('divNotSaved').style.display = '';
    document.getElementById('div_date_' + recId).innerHTML = getDate();
    document.getElementById('hidden_date_' + recId).value = getDate();
    document.getElementById('changed_' + obj.name).style.display = '';
    if (obj.name.substr(0, 5) == 'user_'){
        paint_combo(obj);
    }
}

function getDate(){
    var date = new Date();
    return padZero(date.getDate()) + "." + padZero(date.getMonth() + 1) + "." + date.getFullYear() + " " + padZero(date.getHours()) + ":" + padZero(date.getMinutes());
}
function padZero(num) {
	return (num	< 10)? '0' + num : num ;
}

window.onload = function(){
    document.getElementById('btnSave').disabled = true;
    document.getElementById('btnSave2').disabled = true;
//    form1.reset();
};

function paint_combo(obj){
    obj.style.backgroundColor = obj.options[obj.selectedIndex].style.backgroundColor;
}